package src.Aula07.Ex02;

public class Equipa {
    private String nome, nomeResponsavel;
    private int totalGolosMarcados, totalGolosSofridos;
    private Robo[] robos;

    public Equipa(String nome, String nomeResponsavel, Robo[] robos) {
        this.nome = nome;
        this.nomeResponsavel = nomeResponsavel;
        this.totalGolosMarcados = 0;
        this.totalGolosSofridos = 0;
        this.robos = robos;
    }

    
//get
    public String getNome() {return nome;}
    public String getNomeResponsavel() {return nomeResponsavel;}
    public int getTotalGolosMarcados() {return totalGolosMarcados;}
    public int getTotalGolosSofridos() {return totalGolosSofridos;}
    public Robo[] getRobos() {return robos;}



//set
    public void setNome(String nome) {
        this.nome = nome;
    }

    public void setNomeResponsavel(String nomeResponsavel) {
        this.nomeResponsavel = nomeResponsavel;
    }

    public void setTotalGolosMarcados(int totalGolosMarcados) {
        this.totalGolosMarcados = totalGolosMarcados;
    }

    public void setTotalGolosSofridos(int totalGolosSofridos) {
        this.totalGolosSofridos = totalGolosSofridos;
    }

    public void setRobos(Robo[] robos) {
        this.robos = robos;
    }

    public void AdicionarGoloMarcado() {
        this.totalGolosMarcados++;
    }

    public void AdicionarGoloSofrido() {
        this.totalGolosSofridos++;
    }
    
@Override
//toString
    public String toString() {
        return String.format("Equipa %s: responsavel %s; %d golos marcados; %d golos sofridos", nome, nomeResponsavel,totalGolosMarcados, totalGolosSofridos);
    }
}
